#!/usr/bin/python

import re

hexa = "[\\da-f]{2}"
macaddress = "^%s(:%s){5}$" % (hexa,hexa)
hostprefix = "^quetzal"

def isAddress( line ):
    return True if re.match( hostprefix, line ) else False

def isMAC( address ):
    return True if re.match( macaddress, address ) else False

def getMACs( file ):
    dirs = {}
    fmac = open( file, "r" )
    macs = filter( isAddress, fmac.readlines() )
    fmac.close()
    for mac in macs:
         address = mac.split(" ")[1]
	 if isMAC( address ) :
	     dirs[mac.split(" ")[0]] = address
    return dirs

path = raw_input("file:> ")

machines = getMACs( path )

print machines



